/**
 * 
 */
package org.perfect.batch;

import org.apache.dubbo.config.annotation.DubboReference;
import org.perfect.batch.api.IBatchService;
import org.perfect.batch.configuration.QuotationJobConfiguration;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author billmse
 *
 */
@Component
public class BatchClusterRunner {

	@DubboReference(injvm = false, check = false)
	private IBatchService service;

	@Scheduled(initialDelay = 5000, fixedRate = 1000)
	public void run() {
		service.startJob(QuotationJobConfiguration.JOB_NAME);
	}

}
